<%@page import="java.util.List"%>
<%@page import="com.aring.bean.MatchInfo"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<title>赛事</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<link href="../css/matchList.css" rel="stylesheet" type="text/css" media="screen">
		<script type="text/javascript" src="../js/jquery-1.9.0.min.js"></script>
		<script type="text/javascript">
			$(document).ready(function(){
				$('a').click(function(){
					if($(this).parent().parent().next().is(':hidden')){
						$(this).parent().parent().next().show();
					}
					else
						$(this).parent().parent().next().hide();
				})
			})
		</script>
	</head>
	<body>
	<%  List<MatchInfo> matchInfos = (List<MatchInfo>)session.getAttribute("matchInfos");
	    int pageNumber = Integer.valueOf(request.getParameter("page"));	
	%>
		<ul id="nav">
			<h2 class="R-h2"><span>当前位置：<a href="../index.jsp">首 页</a> &gt; <a href="#">大学城体育赛事</a></span><label>大学城体育赛事</label></h2> 
		</ul>
		<div class="Main" style="margin-top: 10px;">
			    <ul class="News_ul"> 
			    <li><span class="Title">约战标题</span>发布时间</li>
			    <% if(matchInfos!=null){
			    	for(MatchInfo matchInfo : matchInfos){%>
			    	<li><span class="Title"><a href="javscript:void(0);" ><%=matchInfo.getContent()%></a></span><%=matchInfo.getPublic_time().toLocaleString() %></li> 
			    	<div  style="display:none;">
			     	<span>详细信息</span>
			     	<span>赛事地址：</span><span><%=matchInfo.getPlace() %></span>
			     	<span>举办时间：</span><span><%=matchInfo.getMatch_time().toString() %></span>
			     </div>			  	
			    <%}}%>
			    </ul> 
			    <div class="Page"> 
			     <span>共<%=(matchInfos==null)?0:matchInfos.size()%>条</span>
			     <span>当前第<%=pageNumber %>页</span>
			     <a href="../getMatchInfo.do?pageName=redirect:user/matchList.jsp&page=1" class="Num">首页</a>
			     <a href="../getMatchInfo.do?pageName=redirect:user/matchList.jsp&page=<%=pageNumber-1%>" class="Num">上一页</a> 
			     <a href="../getMatchInfo.do?pageName=redirect:user/matchList.jsp&page=<%=pageNumber+1%>" class="Num">下一页</a> 
			    </div> 
		</div>
	</body>
</html>